package serializable.writable;

import java.io.*;

public class ObjWithFile {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        File file = new File("output/mywritable.out");
        ObjectOutputStream oout = new ObjectOutputStream(new FileOutputStream(file));

        MyWritable myWrite = new MyWritable();
        myWrite.setCounter(123456);
        myWrite.setTimestamp(1523023481);
        oout.writeObject(myWrite);
        oout.close();

    }
}
